Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document const {} syntax for std::thread_local. #110620

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

Noratrieb
Copy link
Member

It exists and is pretty cool. More people should use it.

It was added in #83416 and stabilized in #91355 with the tracking issue #84223.

@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2023

r? @thomcc

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@Noratrieb
Copy link
Member Author

I'm marking it as relnotes because this was never in any release notes and it's pretty cool so it should be announced at least in some release notes, even if we're almost two years late.

@Noratrieb Noratrieb added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 20, 2023
@joboet
Copy link
Member

joboet commented Apr 20, 2023

Also see #109908, which documents the same thing but is slightly more verbose.

@thomcc
Copy link
Member

thomcc commented Apr 21, 2023

I think @m-ou-se's suggestion is worth taking, but r=me with that

@Noratrieb Noratrieb force-pushed the document-the-undocumented branch from b23fa6f to 3000818 Compare April 22, 2023 20:59
@Noratrieb
Copy link
Member Author

what do we do with #109908 now? should I close mine or should we just merge mine because it's ready now?

@rust-log-analyzer

This comment has been minimized.

It exists and is pretty cool. More people should use it.
@Noratrieb Noratrieb force-pushed the document-the-undocumented branch from 3000818 to b56d85d Compare April 27, 2023 18:24
@Noratrieb
Copy link
Member Author

It's been two weeks on the other PR and while it's a big unfortunate that we have two PRs doing this (I did check the tracking issue but the other PR didn't backlink anything) this PR is ready while the other one hasn't been.
@bors r=thomcc rollup

@bors
Copy link
Contributor

bors commented Apr 27, 2023

📌 Commit b56d85d has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#109702 (configure --set support list as arguments)
 - rust-lang#110620 (Document `const {}` syntax for `std::thread_local`.)
 - rust-lang#110721 (format panic message only once)
 - rust-lang#110881 (refactor(docs): remove macro resolution fallback)
 - rust-lang#110893 (remove inline const deadcode in typeck)
 - rust-lang#110898 (Remove unused std::sys_common::thread_local_key::Key)
 - rust-lang#110909 (Skip `rustc` version detection on macOS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 085fbe9 into rust-lang:master Apr 28, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 28, 2023
@Noratrieb Noratrieb deleted the document-the-undocumented branch April 28, 2023 06:37
kpreid added a commit to kpreid/all-is-cubes that referenced this pull request Jul 11, 2023
This is newly documented but not new:
rust-lang/rust#110620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants